/**
 * @file temp.h
 * @author Derek Liu (yjkhtddx@sina.com)
 * @brief 
 * @version 0.1
 * @date 2021-02-24
 * 
 * @copyright Copyright Sci-Tech Laboratories (c) 2021
 * 
 */

#include <stdio.h>
#include <stdlib.h>

typedef struct TargetStruct_t
{
    int m_id;
    void *m_opaque;
    int (*m_callback)(void *, int,int);
} TargetStruct;

TargetStruct *createTarget(int id);
int freeTarget(TargetStruct *target);
int setCallback(TargetStruct *target, int (*callback)(void *, int,int), void *opaque);
int runCallback(TargetStruct *target, int data);